import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
///广场输入框

class WidgetSquareInput extends StatelessWidget{

  final String title;
  final TextInputType textInputType;
  final String hintText;

  const WidgetSquareInput({Key key,this.title, this.textInputType, this.hintText='-'}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      decoration: BoxDecoration(
        border: Border(
          bottom: BorderSide(
            color: Colors.black12,
            width: 0.5
          )
        )
      ),
      alignment: Alignment.center,
      padding: EdgeInsets.only(top: 10.0,bottom: 10.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Container(
            width: ScreenUtil().setWidth(150),
            child: Text(title),
          ),
          Container(
              width: ScreenUtil().setWidth(550),
            child: TextField(
              keyboardType:textInputType,
              maxLines: 1,
              autofocus: false,
              textAlign: TextAlign.right,
              decoration: InputDecoration(
                  hintText: '${hintText}',
                  border: InputBorder.none,
                  contentPadding: EdgeInsets.only(top: 5.0)
              ),
            ),
          )
        ],
      )
    );
  }

}